<div class="main-page">
    <div class="game-title">Tải game <?php echo $model->name ?> - <span>MIỄN PHÍ</span></div>
    <div class="game-info">
        <img width="100px;" height="100px" src="<?php echo Yii::app()->createUrl('files/games/50x50-'.$model->image); ?>"/>
        <div class="game-info-details">            
            <div class="game-info-item"><b>Version: </b><?php if(($model->getCurrentVersion($device))) echo $model->getCurrentVersion($device)->getCurrentVersion(); else echo "N/A"; ?></div>            
            <div class="game-info-item"><b>Dung lượng: </b><?php if(($model->getCurrentVersion($device))) echo $model->getCurrentVersion($device)->getSize(); else echo "N/A"?></div>
            <div class="game-info-item"><b>Số lượt tải: </b><?php  echo $model->countDownload;?></div>
            <div class="game-download"><b>Tải về: </b><a href="<?php echo Yii::app()->createUrl('site/download?game='.$model->code_identifier) ?>" style="padding-right: 5px">Jar</a><a href="<?php echo Yii::app()->createUrl('site/download?game='.$model->code_identifier.'&option=1') ?>">Jad</a></div>
        </div>
    </div>    
    
    <div class="game-description">
        <?php $content = str_replace('../../../../files/games/', '../files/games/', $model->description_j2me) ?>
        <?php echo $content; ?>
    </div>
    <table width="100%" style="margin-top: 5px;">
        <tr bgcolor="#EAEAEA" style="width:100%;">
            <td>
                <hr style="border-top: solid 1px lightgray;">
                <b>Các game khác</b>
                <?php if(isset($modelGameDiff)):?>
                    <?php foreach($modelGameDiff as $item):?>
                    <table style="margin:2px;width:100%;">
                        <tbody>
                        <tr style="font-size:small">
                            <td width="32">
                                <a href="<?php echo Yii::app()->createUrl('game/'.$item->game->slug); ?>"><img width="32px" height="32px" src="<?php echo Yii::app()->createAbsoluteUrl('files/games/50x50-'.$item->game->image) ?>"></a>	
                            </td>
                            <td><a href="<?php echo Yii::app()->createUrl('game/'.$item->game->slug); ?>"><?php echo $item->game->name ?></a></td>
                        </tr>
                        </tbody>
                    </table>			
                    <?php endforeach;?>
                <?php endif;?>
            </td>                            
        </tr>
    </table>
</div>


